# -*- coding: utf-8 -*-

# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
import logging


# 可以在输出日志中显示 是那个文件名出现的日志信息
logger = logging.getLogger(__name__)


class CPipeline:
    def process_item(self, item, spider):
        logger.warning(f"pipeline：{item}")
        return item

    def close_spider(self, spider):
        # print(type(spider.chrome))
        # print(f"spider.a --> {spider.a}")
        print(f"{logger.name} --> 爬虫关闭")